home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Problem Negating an Unsigned Char
- Date: Tue, 05 Mar 96 15:16:13 GMT
- Organization: none
- Message-ID: <826038973snz@genesis.demon.co.uk>
- References: <Dnnros.Lq.0.-s@hkusuc.hku.hk> <4he27sINNdel@keats.ugrad.cs.ubc.ca> <4he5f0$acv@solutions.solon.com> <4hfkk6INN2tm@keats.ugrad.cs.ubc.ca> <4hgag5$8r8@solutions.solon.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4hgag5$8r8@solutions.solon.com>
- seebs@solutions.solon.com "Peter Seebach" writes:
-
- >In article <4hfkk6INN2tm@keats.ugrad.cs.ubc.ca>,
- >Kazimir Kylheku <c2a192@ugrad.cs.ubc.ca> wrote:
- >>In article <4he5f0$acv@solutions.solon.com>,
- >>Peter Seebach <seebs@solutions.solon.com> wrote:
- >> >In article <4he27sINNdel@keats.ugrad.cs.ubc.ca>,
- >> >Kazimir Kylheku <c2a192@ugrad.cs.ubc.ca> wrote:
- >> >>To make it portable, you must manually mask for the lower eight bits:
- >
- >> >> if (a == (~b & 0xff))
- >
- >> >Close, but the cigar yet escapes you.
- >
- >>No it does not. I _wanted_ eight bit arithmetic, not CHAR_BIT arithmetic.
- >
- >Oh. I assumed the goal was to get the effect of negating all the bits in
- >a char. Never mind.
-
- As my old music teacher used to say - "Read the question; if it asks you
- to write an essay on `white' and you write the world's greatest essay
- on `black' you will get no marks."
-
- :-)
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-